package top.jlzhou.jobs.mapper;

import top.jlzhou.jobs.entity.UserInfo;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author J.L.Zhou
 * @since 2018-10-22
 */
public interface UserInfoMapper extends BaseMapper<UserInfo> {

	@Update("update user_info set TOKEN=null where TOKEN=#{token}")
	void clearToken(@Param("token")Long token);
	
	@Update("update user_info set TOKEN=#{token} where user_name=#{userName}")
	void updateToken(UserInfo user);
}
